package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RealmMapper;
import com.ruoyi.system.domain.Realm;
import com.ruoyi.system.service.IRealmService;
import com.ruoyi.common.core.text.Convert;

/**
 * 域名 服务层实现
 * 
 * @author ruoyi
 * @date 2019-04-10
 */
@Service
public class RealmServiceImpl implements IRealmService 
{
	@Autowired
	private RealmMapper realmMapper;

	/**
     * 查询域名信息
     * 
     * @param realmId 域名ID
     * @return 域名信息
     */
    @Override
	public Realm selectRealmById(String realmId)
	{
	    return realmMapper.selectRealmById(realmId);
	}
	
	/**
     * 查询域名列表
     * 
     * @param realm 域名信息
     * @return 域名集合
     */
	@Override
	public List<Realm> selectRealmList(Realm realm)
	{
	    return realmMapper.selectRealmList(realm);
	}
	
    /**
     * 新增域名
     * 
     * @param realm 域名信息
     * @return 结果
     */
	@Override
	public int insertRealm(Realm realm)
	{
	    return realmMapper.insertRealm(realm);
	}
	
	/**
     * 修改域名
     * 
     * @param realm 域名信息
     * @return 结果
     */
	@Override
	public int updateRealm(Realm realm)
	{
	    return realmMapper.updateRealm(realm);
	}

	/**
     * 删除域名对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteRealmByIds(String ids)
	{
		return realmMapper.deleteRealmByIds(Convert.toStrArray(ids));
	}
	
}
